package RDFManager;

import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.riot.Lang;
import org.apache.jena.riot.RDFDataMgr;

public class JenaReader {
  public static Model rdfxml(String filename) {
    Model model = ModelFactory.createDefaultModel();
    RDFDataMgr.read(model, filename, Lang.RDFXML);
    return model;
  }

  public static Model turtle(String filename) {
    Model model = ModelFactory.createDefaultModel();
    RDFDataMgr.read(model, filename, Lang.TURTLE);
    return model;
  }

  public static Model ntriples(String filename) {
    Model model = ModelFactory.createDefaultModel();
    RDFDataMgr.read(model, filename, Lang.NTRIPLES);
    return model;
  }
}
